﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace CalcApp
{
    public partial class MainForm : Form
    {
        public MainForm()
        {
            InitializeComponent();
        }

        private void 計算_Click(object sender, EventArgs e)
        {
            decimal 金額;
            金額 = decimal.Multiply(単価.Value,個数.Value);

            if ( パーセント8.Checked == true)
            {
                金額 += decimal.Multiply(金額,0.08m);
            }
            else if(パーセント10.Checked == true)
            {
                金額 += decimal.Multiply(金額, 0.10m);
            }
            this.金額.Text = string.Format("{0:N0}円", 金額); 
        }
    }
}
